<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
	<style type="text/css">
	html, body {
		margin: 0;
		padding: 0;
	}
	</style>
	<script th:src="@{/lib/jquery/jquery-1.12.4.min.js}"></script>
</head>	
<body>
	<div style="width:100%; height: 600px" th:utext="${pageoffice}" id="po_div"> </div>
<script type="text/javascript">
function do_layout() {
	var h = $(window).height();
	var height = (h < 600 ? 600 : h - 30) + 'px';
	$("#po_div").css('height', height);
}
$(function(){
	do_layout();
	$(window).resize(function(){
		do_layout();
	})
});
function fullScreen() {
    document.getElementById("page_office").FullScreen = !document.getElementById("page_office").FullScreen;
}
function printSet() {
    document.getElementById("page_office").ShowDialog(5); 
}
function printFile() {
     document.getElementById("page_office").ShowDialog(4); 
}
//隐藏/显示 Office工具栏
function office_toolbar() {
    document.getElementById("page_office").OfficeToolbars = !document.getElementById("page_office").OfficeToolbars;
}
//另存为PDF文件
function SaveAsPDF() {
    document.getElementById("page_office").WebSaveAsPDF();
    var $form = $('<form method="GET"></form>');
    $form.attr('action', '[[@{/download/pdf/} + ${docName}]]');
    $form.appendTo($('body'));
    $form.submit();
}

function OpenPDF() {
	
}
//隐藏/显示 标题栏
function title_bar() {
    document.getElementById("page_office").Titlebar = !document.getElementById("page_office").Titlebar;
}
function close(){
	window.external.close(); 
}
</script>
</body>
</html>
